<!--title-->
<div class="mnav1">
    <div class="m_nav">
        <div class="nav_left">
            <em class="home_icon"><?=$this->sys_name?></em><span>&nbsp;&gt;&nbsp;</span><font><?=$this->title?></font>
        </div>
    </div>
</div>

<div class="content-table2">
    <div class="content-table-title"><?=$this->title?></div>
    <div class="form-edit-task">

        <form action="/others/product-managers-add-submit" method="post" name="form1" onsubmit="submitform(this);return false;">
            <table border="0" width="100%">
                <tr>
                    <td align="right">产品：</td>
                    <td align="left">
                        <select name="product_id" id="product_id">
                            <option value=""></option>
                            <?php foreach($this->products_arr as $product_id => $product_name):?>
                                <option value="<?=$product_id?>"><?=$product_name?></option>
                            <?php endforeach;?>
                        </select><font color="red"> *</font>
                    </td>
                </tr>
                <tr>
                    <td align="right">执行主管：</td>
                    <td align="left">
                        <select name="emp_id" id="emp_id">
                            <option value=""></option>
                            <?php foreach($this->managers_arr as $emp_id => $emp_info):?>
                                <option value="<?=$emp_id?>"><?=$emp_info['username']?> (<?=$emp_info['realName']?>)</option>
                            <?php endforeach;?>
                        </select><font color="red"> *</font>
                    </td>
                </tr>
                <tr>
                    <td align="right" width="30%">操作权：</td>
                    <td align="left"><select name="is_primary" id="is_primary">
                            <option value="1" selected="selected">有操作权</option>
                            <option value="0">无操作权，仅抄送邮件</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td align="right">状态：</td>
                    <td align="left"><select name="status" id="status">
                            <option value="1" selected="selected">正常</option>
                            <option value="0">冻结</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" align="center"><input type="button" class="buttonlong" value="提交" onclick="submitform();return false;" /></td>
                </tr>
            </table>
            <br /><br />
        </form>
    </div>
    <br/><br/>
</div>


<script>
    function submitform()
    {
        if( document.form1.product_id.value.length == 0 )
        {
            alert("产品不能为空。");
            return false;
        }else if( document.form1.emp_id.value.length == 0 )
        {
            alert("执行主管不能为空。");
            return false;
        }

        form1.submit();
    }
</script>